package com.cskaoyan.bean.bo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import java.util.List;


@NoArgsConstructor
@AllArgsConstructor
public class GoodListBO {
    private Integer brandId;
    private String brief;
    private Integer categoryId;
    private BigDecimal counterPrice;
    private String detail;
    private List<String> gallery;//*
    private String goodsSn;
    private Boolean isHot;
    private Boolean isNew;
    private Boolean isOnSale;
    private String keywords;
    private String name;
    private String picUrl;
    private String unit;
    private String galleryString;//*

    public Integer getBrandId() {
        return brandId;
    }

    public void setBrandId(Integer brandId) {
        this.brandId = brandId;
    }

    public String getBrief() {
        return brief;
    }

    public void setBrief(String brief) {
        this.brief = brief;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public BigDecimal getCounterPrice() {
        return counterPrice;
    }

    public void setCounterPrice(BigDecimal counterPrice) {
        this.counterPrice = counterPrice;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public List<String> getGallery() {
        return gallery;
    }

    public void setGallery(List<String> gallery) {
        this.gallery = gallery;
        StringBuffer sb1 = new StringBuffer();
        sb1.append("[");
        if (gallery!=null&&gallery.size()!=0){
            for (String g : gallery) {
                sb1.append("\"");
                sb1.append(g);
                sb1.append("\",");

            }
            sb1.deleteCharAt(sb1.length()-1);
        }
        this.galleryString = sb1.append("]").toString();
//        this.galleryString = Arrays.toString(gallery.toArray());
    }

    public String getGoodsSn() {
        return goodsSn;
    }

    public void setGoodsSn(String goodsSn) {
        this.goodsSn = goodsSn;
    }

    public Boolean getHot() {
        return isHot;
    }

    public void setHot(Boolean hot) {
        isHot = hot;
    }

    public Boolean getNew() {
        return isNew;
    }

    public void setNew(Boolean aNew) {
        isNew = aNew;
    }

    public Boolean getOnSale() {
        return isOnSale;
    }

    public void setOnSale(Boolean onSale) {
        isOnSale = onSale;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getGalleryString() {
        return galleryString;
    }

    public void setGalleryString(String galleryString) {
        this.galleryString = galleryString;
    }
}
